<?php /* Smarty version 2.6.12, created on 2008-12-10 10:11:01
         compiled from main/popup_product.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'config_load', 'main/popup_product.tpl', 3, false),array('modifier', 'strip_tags', 'main/popup_product.tpl', 6, false),array('modifier', 'default', 'main/popup_product.tpl', 7, false),array('modifier', 'escape', 'main/popup_product.tpl', 11, false),array('modifier', 'replace', 'main/popup_product.tpl', 11, false),array('modifier', 'stripslashes', 'main/popup_product.tpl', 13, false),array('modifier', 'truncate', 'main/popup_product.tpl', 59, false),)), $this); ?>
<?php func_load_lang($this, "main/popup_product.tpl","lbl_select_product,err_choose_product,err_choose_category,lbl_bookmarks,lbl_delete,lbl_categories,lbl_show_products,txt_no_products_in_cat,lbl_products,lbl_select,lbl_bookmark,lbl_choose_product"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php echo smarty_function_config_load(array('file' => ($this->_tpl_vars['skin_config'])), $this);?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><?php echo ((is_array($_tmp=$this->_tpl_vars['lng']['lbl_select_product'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp) : smarty_modifier_strip_tags($_tmp)); ?>
</title>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo ((is_array($_tmp=@$this->_tpl_vars['default_charset'])) ? $this->_run_mod_handler('default', true, $_tmp, "iso-8859-1") : smarty_modifier_default($_tmp, "iso-8859-1")); ?>
" />
	<link rel="stylesheet" href="<?php echo $this->_tpl_vars['SkinDir']; ?>
/skin1_admin.css" />
<script type="text/javascript">
<!--
var err_choose_product = "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['err_choose_product'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp) : smarty_modifier_strip_tags($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')))) ? $this->_run_mod_handler('replace', true, $_tmp, "\n", ' ') : smarty_modifier_replace($_tmp, "\n", ' ')))) ? $this->_run_mod_handler('replace', true, $_tmp, "\r", ' ') : smarty_modifier_replace($_tmp, "\r", ' ')); ?>
";
var err_choose_category = "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['err_choose_category'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp) : smarty_modifier_strip_tags($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')))) ? $this->_run_mod_handler('replace', true, $_tmp, "\n", ' ') : smarty_modifier_replace($_tmp, "\n", ' ')))) ? $this->_run_mod_handler('replace', true, $_tmp, "\r", ' ') : smarty_modifier_replace($_tmp, "\r", ' ')); ?>
";
var id_obj = window.opener.document.<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_productid'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
 ? window.opener.document.<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_productid'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
 : window.opener.document.getElementById('<?php echo $GLOBALS['HTTP_GET_VARS']['field_productid']; ?>
');
var name_obj = window.opener.document.<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_product'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
 ? window.opener.document.<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_product'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
 : window.opener.document.getElementById('<?php echo $GLOBALS['HTTP_GET_VARS']['field_product']; ?>
');

<?php echo '
function setProduct (productid, product) {
	if (id_obj)
		id_obj.value = productid;
	if (name_obj)
		name_obj.value=product;

	window.close();
}
function setProductInfo () {
	if (document.products_form.productid.value != "") {
		setProduct (document.products_form.productid.options[document.products_form.productid.selectedIndex].value, document.products_form.productid.options[document.products_form.productid.selectedIndex].text);
	} else {
		alert (err_choose_product);
	}
}

function checkCategory () {
	if (document.cat_form.cat.selectedIndex == -1) {
		alert (err_choose_category);
		return false;
	}
	return true;
}

'; ?>

-->
</script>
</head>
<body>
<br />
<?php ob_start(); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td colspan="2">
<table cellpadding="2" cellspacing="0">
<tr>
	<td valign="top"><font class="TopLabel"><?php echo $this->_tpl_vars['lng']['lbl_bookmarks']; ?>
:</font></td>
	<td valign="top">
<?php if ($this->_tpl_vars['bookmarks'] != ""): ?>
<ul>
<?php unset($this->_sections['book_idx']);
$this->_sections['book_idx']['name'] = 'book_idx';
$this->_sections['book_idx']['loop'] = is_array($_loop=$this->_tpl_vars['bookmarks']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['book_idx']['show'] = true;
$this->_sections['book_idx']['max'] = $this->_sections['book_idx']['loop'];
$this->_sections['book_idx']['step'] = 1;
$this->_sections['book_idx']['start'] = $this->_sections['book_idx']['step'] > 0 ? 0 : $this->_sections['book_idx']['loop']-1;
if ($this->_sections['book_idx']['show']) {
    $this->_sections['book_idx']['total'] = $this->_sections['book_idx']['loop'];
    if ($this->_sections['book_idx']['total'] == 0)
        $this->_sections['book_idx']['show'] = false;
} else
    $this->_sections['book_idx']['total'] = 0;
if ($this->_sections['book_idx']['show']):

            for ($this->_sections['book_idx']['index'] = $this->_sections['book_idx']['start'], $this->_sections['book_idx']['iteration'] = 1;
                 $this->_sections['book_idx']['iteration'] <= $this->_sections['book_idx']['total'];
                 $this->_sections['book_idx']['index'] += $this->_sections['book_idx']['step'], $this->_sections['book_idx']['iteration']++):
$this->_sections['book_idx']['rownum'] = $this->_sections['book_idx']['iteration'];
$this->_sections['book_idx']['index_prev'] = $this->_sections['book_idx']['index'] - $this->_sections['book_idx']['step'];
$this->_sections['book_idx']['index_next'] = $this->_sections['book_idx']['index'] + $this->_sections['book_idx']['step'];
$this->_sections['book_idx']['first']      = ($this->_sections['book_idx']['iteration'] == 1);
$this->_sections['book_idx']['last']       = ($this->_sections['book_idx']['iteration'] == $this->_sections['book_idx']['total']);
?>
	<li>
	<a href="javascript: setProduct('<?php echo $this->_tpl_vars['bookmarks'][$this->_sections['book_idx']['index']]['productid']; ?>
','<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['bookmarks'][$this->_sections['book_idx']['index']]['product'])) ? $this->_run_mod_handler('replace', true, $_tmp, "'", "\'") : smarty_modifier_replace($_tmp, "'", "\'")))) ? $this->_run_mod_handler('replace', true, $_tmp, '"', "\'\'") : smarty_modifier_replace($_tmp, '"', "\'\'")); ?>
')"><?php echo ((is_array($_tmp=$this->_tpl_vars['bookmarks'][$this->_sections['book_idx']['index']]['product'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 30, "...", true) : smarty_modifier_truncate($_tmp, 30, "...", true)); ?>
</a>
	&nbsp;&nbsp;
	<a href="popup_product.php?mode=delete_bookmark&amp;cat=<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['cat'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
&amp;productid=<?php echo $this->_tpl_vars['bookmarks'][$this->_sections['book_idx']['index']]['productid']; ?>
&amp;field_product=<?php echo $GLOBALS['HTTP_GET_VARS']['field_product']; ?>
&amp;field_productid=<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_productid'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
"><b>[<?php echo $this->_tpl_vars['lng']['lbl_delete']; ?>
]</b></a>
	</li>
<?php endfor; endif; ?>
</ul>
<?php else: ?>
&nbsp;
<?php endif; ?>
	</td>
</tr>
</table>
<hr />
	</td>
</tr>
<tr>
	<td width="50%" valign="top">

<form method="get" onsubmit="javascript: return checkCategory ()" name="cat_form">
<input type="hidden" name="top_cat" value="<?php echo $GLOBALS['HTTP_GET_VARS']['top_cat']; ?>
" />
<input type="hidden" name="field_product" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_product'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" />
<input type="hidden" name="field_productid" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_productid'])) ? $this->_run_mod_handler('stripslashes', true, $_tmp) : stripslashes($_tmp)); ?>
" />

<b><?php echo $this->_tpl_vars['lng']['lbl_categories']; ?>
:</b><br />
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/category_selector.tpl", 'smarty_include_vars' => array('field' => 'cat','extra' => ' size="20" style="width: 100%" ondblclick="javascript: if (checkCategory()) document.cat_form.submit();"','categoryid' => $GLOBALS['HTTP_GET_VARS']['cat'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br /><br />
<center><input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_show_products'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /></center>
</form>

	</td>
	<td width="50%" valign="top">
<?php if ($this->_tpl_vars['products'] == ""):  echo $this->_tpl_vars['lng']['txt_no_products_in_cat']; ?>

<?php else: ?>

<form method="get" name="products_form">
<input type="hidden" name="cat" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['cat'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />
<input type="hidden" name="mode" value="bookmark" />
<input type="hidden" name="field_productid" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_productid'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />
<input type="hidden" name="field_product" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['field_product'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />

<b><?php echo $this->_tpl_vars['lng']['lbl_products']; ?>
:</b><br />
<select name="productid" size="20" style="width: 100%" ondblclick="javascript: setProductInfo();" onChange="javascript: showTitle(this.options[this.selectedIndex].text, 'left');">
<?php unset($this->_sections['prod_idx']);
$this->_sections['prod_idx']['name'] = 'prod_idx';
$this->_sections['prod_idx']['loop'] = is_array($_loop=$this->_tpl_vars['products']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['prod_idx']['show'] = true;
$this->_sections['prod_idx']['max'] = $this->_sections['prod_idx']['loop'];
$this->_sections['prod_idx']['step'] = 1;
$this->_sections['prod_idx']['start'] = $this->_sections['prod_idx']['step'] > 0 ? 0 : $this->_sections['prod_idx']['loop']-1;
if ($this->_sections['prod_idx']['show']) {
    $this->_sections['prod_idx']['total'] = $this->_sections['prod_idx']['loop'];
    if ($this->_sections['prod_idx']['total'] == 0)
        $this->_sections['prod_idx']['show'] = false;
} else
    $this->_sections['prod_idx']['total'] = 0;
if ($this->_sections['prod_idx']['show']):

            for ($this->_sections['prod_idx']['index'] = $this->_sections['prod_idx']['start'], $this->_sections['prod_idx']['iteration'] = 1;
                 $this->_sections['prod_idx']['iteration'] <= $this->_sections['prod_idx']['total'];
                 $this->_sections['prod_idx']['index'] += $this->_sections['prod_idx']['step'], $this->_sections['prod_idx']['iteration']++):
$this->_sections['prod_idx']['rownum'] = $this->_sections['prod_idx']['iteration'];
$this->_sections['prod_idx']['index_prev'] = $this->_sections['prod_idx']['index'] - $this->_sections['prod_idx']['step'];
$this->_sections['prod_idx']['index_next'] = $this->_sections['prod_idx']['index'] + $this->_sections['prod_idx']['step'];
$this->_sections['prod_idx']['first']      = ($this->_sections['prod_idx']['iteration'] == 1);
$this->_sections['prod_idx']['last']       = ($this->_sections['prod_idx']['iteration'] == $this->_sections['prod_idx']['total']);
?>
	<option value="<?php echo $this->_tpl_vars['products'][$this->_sections['prod_idx']['index']]['productid']; ?>
"><?php echo $this->_tpl_vars['products'][$this->_sections['prod_idx']['index']]['product']; ?>
</option>
<?php endfor; endif; ?>
</select><br /><br />
<center>
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_select'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: setProductInfo();" />
	&nbsp;&nbsp;
	<input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_bookmark'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
</center>
</form>
<?php endif; ?>

	</td>
</tr>
</table>
<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean(); ?>

<div align="center">
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('content' => $this->_smarty_vars['capture']['dialog'],'title' => $this->_tpl_vars['lng']['lbl_choose_product'],'extra' => "width=90%")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</div>

</body>
</html>